﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using CardInChina.Bussiness.Frontend.Interface;
using CardInChina.Data.Entity.Entity;

namespace CardInChina.Web.Mvc.Controllers
{
    public class GameController : CICBasicController
    {
        private CardInfoBusinessService ss = new CardInfoBusinessService();
        private GameBusinessService gc = new GameBusinessService();
        //
        // GET: /Category/

        public ActionResult Index(string gameKey)
        {
            ViewBag.CardInfoesShow = ss.GetCardInfoesShowByGame(gameKey);
            ViewBag.Category = ((IEnumerable<CardInfo>)ViewBag.CardInfoesShow).First().OfCardClass.CategoryKey;
            ViewBag.GameName = gc.GetGameByGameKey(gameKey).GameName;
            return View();
        }

    }
}
